﻿using iMES.Entity.DomainModels;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using YUN.ProcurementRequests.IServices;
using YUN.ProcurementRequests.Services;
using YUN.Rawmanagements.IServices;
using YUN.Rawmanagements.Services;

namespace iMES.WebApi.Cloudsian
{
    public partial class purchasingController
    {
        private readonly IBase_purchasingapplyService _service;//访问业务代码
        private readonly IHttpContextAccessor _httpContextAccessor;
        [ActivatorUtilitiesConstructor]
        public purchasingController(IBase_purchasingapplyService service, IHttpContextAccessor httpContextAccessor) : base(service)
        {
            _service = service;
            _httpContextAccessor = httpContextAccessor;
        }
        //后台App_ProductController中添加代码，返回table数据
        [HttpPost, Route("getSelectorLocation")]
        public IActionResult GetSelectorLocation([FromBody] PageDataOptions options)
        {
            //1.可以直接调用框架的GetPageData查询
            PageGridData<ProcurementRequest> data = Base_purchasingapplyServies.Instance.GetPageData(options);
            return JsonNormal(data);
        }
    }
}
